//
//  UserProtocolController.m
//  敢唆嘛!
//
//  Created by lanou on 15/11/26.
//  Copyright © 2015年 zms. All rights reserved.
//

#import "UserProtocolController.h"


@interface UserProtocolController ()

@end

@implementation UserProtocolController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationController.navigationBar.translucent = NO;
    self.navigationItem.title = @"用户许可协议";
    self.view.backgroundColor = [UIColor whiteColor];
    //创建标题
    UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, KWidth-20, 30)];
    
    titleLabel.text = @"";
    
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.font = [UIFont systemFontOfSize:20];
    [self.view addSubview:titleLabel];
    
    UILabel *contextLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, KWidth-20, 200)];
    
    contextLabel.numberOfLines = 0;
    
    contextLabel.font = [UIFont systemFontOfSize:15];
    
    contextLabel.text = @"       欢迎使用本软件, 请务必仔细阅读本条款, 您的直接或者通过各类方式(如站外API引用等)对'本软件'的下载,安装,使用,账号获取,分享和登陆等直接间接使用'本软件'服务和数据的行为,将被视为已经无条件接受本声明所涉全部内容.若您对本声明有异议,请停止使用'本软件'所提供的全部服务";
    
    [self.view addSubview:contextLabel];
    
    //创建确定按钮
    
    UIButton *exitButton = [UIButton buttonWithType:UIButtonTypeCustom];
    
    exitButton.frame = CGRectMake(KWidth/4, KHeight/3*2, KWidth/2, 50);
    
    [exitButton.layer setCornerRadius:10];
    
    exitButton.backgroundColor = [UIColor greenColor];
    
    [exitButton setTitle:@"返回" forState:UIControlStateNormal];
    
    [exitButton addTarget:self action:@selector(exitButton) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:exitButton];
    
}

-(void)exitButton{
    
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (void)didReceiveMemoryWarning {
    
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
